package com.rm.zeyou.mapper;

import com.rm.zeyou.entity.ClockItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rm.zeyou.vo.response.SelectUserCollectionListResponseVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 加钟服务项目表 Mapper 接口
 * </p>
 *
 * @author YanYang
 * @since 2025-03-12 15:55:07
 */
@Mapper
public interface ClockItemMapper extends BaseMapper<ClockItem> {

    List<SelectUserCollectionListResponseVo> selectBellItemList(@Param("tid") Long tid);

    @Update("update t_clock_item set real_sales_count = real_sales_count + #{orderNum} where id = #{itemId}")
    Integer updateSales(@Param("itemId") Long itemId,@Param("orderNum")Integer orderNum);
}
